package com.hong.taotaomall.common;

import org.springframework.stereotype.Component;

@Component
public class BaseContext {
    public static ThreadLocal<Long> threadLocal = new ThreadLocal<>();

    public static void setCurentId(Long id){
        threadLocal.set(id);
    }

    public static  Long getCurrentId(){
        return threadLocal.get();
    }
}
